<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2021/11/16
  Time: 10:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />

    <link rel="stylesheet" href="<%=path %>/web/index/css/font.css">
    <link rel="stylesheet" href="<%=path %>/web/index/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="<%=path %>/web/index/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="<%=path %>/web/index/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript" src="<%=path%>/web/jquery-1.3.1.js"></script>

    <script type="text/javascript">

        function check_form(){
            var file = document.getElementById("file").value;
            var money = document.getElementById("money").value;
            var msname = document.getElementById("msname").value;
            var vd = document.getElementById("vd").value;
            var monunit = document.getElementById("monunit").value;

            if(file==""){
                alert("logo不能为空！请检查！");
                return false;
            }

            if(money==""){
                alert("价格不能为空！请检查！");
                return false;
            }

            if(msname==""){
                alert("产品名称不能为空！请检查！");
                return false;
            }

            if(vd==""){
                alert("增值率不能为空！请检查！");
                return false;
            }

            if(monunit==""){
                alert("增值率单位不能为空！请检查！");
                return false;
            }


        }

        function returnfor(){
            window.location.href = "tab_money_shops_view";
        }


        function check_msg(){
            var msg = '${b }';
            if(msg=="true"){
                alert("操作成功！程序即将返回到列表……");
                returnfor();
            }
            if(msg=="false"){
                alert("操作失败！");
            }
        }

    </script>



</head>

<body onload="check_msg()">
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">理财产品管理</a>
        <a>
          <cite>理财产品创建</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <h1 ><strong style="font-size: 25px;">产品设置</strong></h1>
    <form action="/tab_money_shops_save" method="post" onsubmit="return check_form()" enctype="multipart/form-data">


        <table class="layui-table">

            <tr>
                <th style="text-align: right;">Logo：</th>
                <td style="width: 200px;"><input type="file" name="file" id="file"   autocomplete="off"  class="layui-input"/></td>
                <td style="color: red;">*必填项</td>
            </tr>

            <tr>
                <th style="text-align: right;">产品名称：</th>
                <td style="width: 200px;"><input type="text" name="msname" id="msname"  autocomplete="off"  class="layui-input"/></td>
                <td style="color: red;">*必填项</td>
            </tr>

            <tr>
                <th style="text-align: right;">单价：</th>
                <td style="width: 200px;"><input type="text" name="money" id="money"  autocomplete="off"  class="layui-input" /> 元 </td>
                <td style="color: red;">*必填项</td>
            </tr>

            <tr>
                <th style="text-align: right;">增值率：</th>
                <td style="width: 200px;"><input type="text" name="vd" id="vd"  autocomplete="off"  class="layui-input" /> % </td>
                <td style="color: red;">*必填项</td>
            </tr>

            <tr>
                <th style="text-align: right;">增值率单位：</th>
                <td style="width: 200px;"><input type="text" name="monunit" id="monunit"  autocomplete="off"  class="layui-input"/></td>
                <td style="color: red;">*必填项</td>
            </tr>

            <tr>
                <th style="text-align: right;">是否为精品：</th>
                <td style="width: 200px;">
                    <select name="isv" id="isv" >
                        <option value="0">不是精品</option>
                        <option value="1">是精品</option>
                    </select>
                </td>
                <td style="color: red;"></td>
            </tr>

            <tr>
                <th style="text-align: right;">状态：</th>
                <td style="width: 200px;">
                    <select name="flag" id="flag" >
                        <option value="0">开启</option>
                        <option value="1">关闭</option>
                    </select>
                </td>
                <td style="color: red;"></td>
            </tr>


            <tr>
                <th style="text-align: right;">产品描述：</th>
                <td style="width: 200px;">
                    <textarea rows="6" cols="120" name="discription" id="discription" ></textarea>
                </td>
                <td style="color: red;"></td>
            </tr>



            <tr>
                <td colspan="3" style="text-align: center;">
                    <button class="layui-btn"  lay-submit="" lay-filter="sreach" type="submit">信息创建</button>
                    <button onclick="returnfor()" class="layui-btn"  lay-submit="" lay-filter="sreach" type="button" style="background-color: indianred;"> 返 回 </button>
                </td>
            </tr>

        </table>
    </form>
</div>

</body>

</html>
